home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / syscall / RCS / Ioc_Reposition.c,v < prev    next >
Encoding:
Text File  |  1991-12-11  |  2.9 KB  |  136 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  sprited:1.2.1;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     88.07.29.17.08.46;  author ouster;  state Exp;
  11. branches 1.2.1.1;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     88.06.19.14.29.22;  author ouster;  state Exp;
  16. branches 1.1.1.1;
  17. next     ;
  18.  
  19. 1.1.1.1
  20. date     91.12.10.16.52.01;  author kupfer;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24. 1.2.1.1
  25. date     91.11.27.13.11.39;  author kupfer;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @@
  32.  
  33.  
  34. 1.2
  35. log
  36. @Lint.
  37. @
  38. text
  39. @/* 
  40.  * Ioc_Reposition.c --
  41.  *
  42.  *    Source code for the Ioc_Reposition library procedure.
  43.  *
  44.  * Copyright 1988 Regents of the University of California
  45.  * Permission to use, copy, modify, and distribute this
  46.  * software and its documentation for any purpose and without
  47.  * fee is hereby granted, provided that the above copyright
  48.  * notice appear in all copies.  The University of California
  49.  * makes no representations about the suitability of this
  50.  * software for any purpose.  It is provided "as is" without
  51.  * express or implied warranty.
  52.  */
  53.  
  54. #ifndef lint
  55. static char rcsid[] = "$Header: Ioc_Reposition.c,v 1.1 88/06/19 14:29:22 ouster Exp $ SPRITE (Berkeley)";
  56. #endif not lint
  57.  
  58. #include <sprite.h>
  59. #include <fs.h>
  60.  
  61.  
  62. /*
  63.  *----------------------------------------------------------------------
  64.  *
  65.  * Ioc_Reposition --
  66.  *
  67.  *    Reposition the access position on a filesystem stream.  The next
  68.  *    read or write will start at the byte offset specified by the
  69.  *    combination of base and offset.  Base has three values corresponding
  70.  *    to the beginning of file, current position, and end of file.
  71.  *
  72.  * Results:
  73.  *    None.
  74.  *
  75.  * Side effects:
  76.  *    Sets the stream access position.
  77.  *
  78.  *----------------------------------------------------------------------
  79.  */
  80.  
  81. ReturnStatus
  82. Ioc_Reposition(streamID, base, offset, newOffsetPtr)
  83.     int streamID;        /* StreamID returned from Fs_Open */
  84.     int base;            /* IOC_BASE_ZERO for beginning of file,
  85.                  * IOC_BASE_CURRENT for the current position,
  86.                  * IOC_BASE_EOF for end of file. */
  87.     int offset;            /* Byte offset relative to base */
  88.     int *newOffsetPtr;        /* The resulting access position */
  89. {
  90.     register ReturnStatus status;
  91.     Ioc_RepositionArgs args;
  92.  
  93.     args.base = base;
  94.     args.offset = offset;
  95.     status = Fs_IOControl(streamID, IOC_REPOSITION, sizeof(Ioc_RepositionArgs),
  96.             (Address)&args, sizeof(int), (Address) newOffsetPtr);
  97.     return(status);
  98. }
  99. @
  100.  
  101.  
  102. 1.2.1.1
  103. log
  104. @Initial branch for Sprite server.
  105. @
  106. text
  107. @d17 1
  108. a17 1
  109. static char rcsid[] = "$Header: /sprite/src/lib/c/syscall/RCS/Ioc_Reposition.c,v 1.2 88/07/29 17:08:46 ouster Exp $ SPRITE (Berkeley)";
  110. @
  111.  
  112.  
  113. 1.1
  114. log
  115. @Initial revision
  116. @
  117. text
  118. @d17 1
  119. a17 1
  120. static char rcsid[] = "$Header: proto.c,v 1.2 88/03/11 08:39:08 ouster Exp $ SPRITE (Berkeley)";
  121. d58 1
  122. a58 1
  123.             (Address)&args, sizeof(int), newOffsetPtr);
  124. @
  125.  
  126.  
  127. 1.1.1.1
  128. log
  129. @Initial branch for Sprite server.
  130. @
  131. text
  132. @d17 1
  133. a17 1
  134. static char rcsid[] = "$Header: /sprite/src/lib/c/syscall/RCS/Ioc_Reposition.c,v 1.1 88/06/19 14:29:22 ouster Exp $ SPRITE (Berkeley)";
  135. @
  136.